﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BiliBiliCSharpStudy.old {
    class EventDemo03 {
        public static void Demo() {
            Test1();
        }

        public static void Test1() {
            MyForm1 form = new MyForm1();
            form.Click += form.FormClicked;
            form.ShowDialog();
        }
    }

    class MyForm1 : Form {
        internal void FormClicked(object sender, EventArgs e) {
            //throw new NotImplementedException();
            this.Text = DateTime.Now.ToString();
        }
    }
}
